package com.dsr.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import lombok.Data;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Id;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;

/**
 * @author dsr
 * @since 2020-10-10
 */
@Document(indexName = "flower",type = "flower")
@Data
public class FlowerVO implements Serializable {
    @Id
    private String id;

    private Integer del;
    @Field( type = FieldType.text,index = true,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String description;

    private String imgUrl;

    private Double oldPrice;

    private Double price;

    private Long sales;

    private String section;

    private Integer number;
    @Field( type = FieldType.text,index = true,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String title;

    @Field(index = false,type = FieldType.Date )
    private Date createDate;
    @Field(index = false,type = FieldType.Date )
    private Date updateDate;

}
